﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Admin.NET.Database.Migrations.Migrations
{
    public partial class V104 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<long>(
                name: "ScoreId",
                table: "IT_Plan_Info",
                type: "bigint",
                nullable: false,
                defaultValue: 0L,
                comment: "评分ID");

            migrationBuilder.CreateTable(
                name: "X_Plan_Score",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Ponding = table.Column<double>(type: "float", nullable: false, comment: "积水"),
                    WhiteGarbage = table.Column<double>(type: "float", nullable: false, comment: "白色垃圾"),
                    WaterGrateBlockage = table.Column<double>(type: "float", nullable: false, comment: "水篦子堵塞"),
                    SideDitchSediment = table.Column<double>(type: "float", nullable: false, comment: "边沟积沙"),
                    SideDitchFallenLeaves = table.Column<double>(type: "float", nullable: false, comment: "边沟落叶"),
                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "软删除标记")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_X_Plan_Score", x => x.Id);
                },
                comment: "计划评分表");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "X_Plan_Score");

            migrationBuilder.DropColumn(
                name: "ScoreId",
                table: "IT_Plan_Info");
        }
    }
}
